package com.dd.keel.core.framework.protocol;

import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFactory;
import org.apache.mina.filter.codec.ProtocolEncoder;
import org.apache.mina.filter.codec.ProtocolDecoder;

public class SoaProtocolCodecFactory implements ProtocolCodecFactory {
	
    private ProtocolEncoder encoder;
    private ProtocolDecoder decoder;	
	
    public SoaProtocolCodecFactory()
    {
    	decoder = new SoaProtocolDecoder();
    	encoder = new SoaProtocolEncoder();
    }
	
    public ProtocolEncoder getEncoder(IoSession ioSession) throws Exception {
        return encoder;
    }
    
    public ProtocolDecoder getDecoder(IoSession ioSession) throws Exception {
        return decoder;
    }
    
}
